Skip to content

gh-152260: Fix test_scr_dump() on macOS#152340

Merged
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:curses-scr-dump-macos
Jun 26, 2026
Merged

gh-152260: Fix test_scr_dump() on macOS#152340
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:curses-scr-dump-macos

Conversation

@serhiy-storchaka

Copy link
Copy Markdown
Member

test_scr_dump() compared scr_dump() output files for byte equality, but the dump format embeds raw pointers on some platforms (such as the ncurses shipped with macOS), so two dumps of the same screen are not byte-identical. This made test_curses fail on the macos-26-intel runner.

Probe whether the format is deterministic and only run the dump-file comparisons when it is. On platforms where it is not, the test still checks that the dump is non-empty and that scr_restore(), scr_init() and scr_set() succeed.

The dump format embeds raw pointers on some platforms, so two dumps of the
same screen are not always byte-identical.  Only compare dump files when
the format proves deterministic.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@bedevere-app bedevere-app Bot added the tests Tests in the Lib/test dir label Jun 26, 2026
@serhiy-storchaka serhiy-storchaka added skip news tests Tests in the Lib/test dir and removed tests Tests in the Lib/test dir labels Jun 26, 2026
@serhiy-storchaka serhiy-storchaka merged commit 1d6d33c into python:main Jun 26, 2026
58 checks passed
@serhiy-storchaka serhiy-storchaka deleted the curses-scr-dump-macos branch June 26, 2026 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant